<?php
include $_SERVER['DOCUMENT_ROOT'].'/phpprojects/conn.php';
$locations = array();
$locations["理科大楼"]=array("longtitude"=>31.2276034411,"latitude"=>121.4035302732);
$locations[三馆]=array("longtitude"=>31.2265654411,"latitude"=>121.4038492732);
$locations["计算机楼"]=array("longtitude"=>31.2260094411,"latitude"=>121.4049592732);
$locations["中北学生活动中心"]=array("longtitude"=>31.2302485001,"latitude"=>121.4053566544);
$locations["教书院"]=array("longtitude"=>31.2311595001,"latitude"=>121.4066906544);
$locations["文史楼"]=array("longtitude"=>31.2286069789,"latitude"=>121.4085720299);
$locations["共青场"]=array("longtitude"=>31.2285414411,"latitude"=>121.4044472732);
foreach ($locations as $building => $locArr) {
 	$sql = "update course set longtitude=".$locArr["longtitude"].",latitude=".$locArr["latitude"]." where location like '%$building%'";	
	// echo $sql;
 	mysql_query($sql);
 }
 echo "finished";
